package com.cl.it.utils;

import org.apache.commons.lang3.StringUtils;

import java.util.List;

public class ListUtils {

    public static String append(List<String> list) {
        if (list == null || list.size() == 0) {
            return org.apache.commons.lang3.StringUtils.EMPTY;
        }
        String[] sources = list.get(0).split(" ");
        StringBuilder sb = new StringBuilder();
        for (String str : sources) {
            if (StringUtils.isNotEmpty(sb.toString())) {
                sb.append(",");
            }
            sb.append(str);
        }
        return sb.toString();
    }
}
